package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.DishPageQueryDTO;
import com.sky.entity.Dish;
import com.sky.enumeration.OperationType;
import com.sky.vo.DishVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * ClassName: DishMapper
 * Package: com.sky.mapper
 * Description:菜品
 *
 * @Author: Zhang Peiyuan
 * @Create: 2024-12-18-12:13
 * @Version: v1.0
 */
@Mapper
public interface DishMapper {
    int slelctCountByCategoryId(Long categoryId);

    @AutoFill(OperationType.INSERT)
    void insert(Dish dish);

    Page<DishVO> selectPage(DishPageQueryDTO dishPageQueryDTO);

    Integer selectStatusById(Long id);

    Integer selectCountByDishid(Long id);

    void deleteById(Long id);

    void deleteByIds(List<Long> ids);

    Dish selectById(Long id);

    @AutoFill(OperationType.UPDATE)
    void update(Dish dishBase);

    List<Dish> selectList(Dish dish);

    List<Dish> getBySetmealId(Long id);
}
